package com.graph;

import java.util.LinkedList;

/**
 *code_repository_delta
 *@author huliangjun
 *@date 2018/11/30 11:23
 */
public class Vertex {

    /** 平台名称*/
    String name;

    /** 相邻顶点*/
    LinkedList<Vertex> adj;

    /** 距离*/
    int dist;

    /** 最短路径中的前一个顶点*/
    Vertex prePath;

    public Vertex(String nm) {
        name = nm;
        adj = new LinkedList<>();
        reset();
    }

    public void reset() {
        dist = MapGraph.INFINITY;
        prePath = null;
    }
}
